<?php

namespace addons\shopro\controller;

use think\Db;

class Shop extends Common
{

    protected $noNeedLogin = [];
    protected $noNeedRight = ['*'];

    /**
     * @menu:店铺列表
     */
    public function index()
    {
        $model = new \app\common\model\shopro\Shop();
        $model = $model->where(['status'=>1]);
        $province_name = input('province_name');
        if($province_name){
            $model = $model->where('province_name','like','%'.$province_name.'%');
        }
        $city_name = input('city_name');
        if($city_name){
            $model = $model->where('city_name','like','%'.$city_name.'%');
        }
        $data  = $model->order('id desc')->field('licence_image,normal_money,virtual_money,reason,status,parent_id,user_id',true)->select();
        $this->success('ok',$data);
    }
}
